package com.sfddata.musicpillow.user.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName user_clock
 */
@TableName(value ="user_clock")
@Data
public class UserClock implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 绑定的用户id
     */
    private Integer userId;

    /**
     * 唤醒时间
     */
    private String time;

    /**
     * 是否需要天气播报
     */
    private String wea;

    /**
     * 柔性唤醒时间
     */
    private Integer sortWakeTime;

    /**
     * 唤醒音乐
     */
    private String wakeMusic;

    /**
     * 是否删除
     */
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserClock other = (UserClock) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getWea() == null ? other.getWea() == null : this.getWea().equals(other.getWea()))
            && (this.getSortWakeTime() == null ? other.getSortWakeTime() == null : this.getSortWakeTime().equals(other.getSortWakeTime()))
            && (this.getWakeMusic() == null ? other.getWakeMusic() == null : this.getWakeMusic().equals(other.getWakeMusic()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getWea() == null) ? 0 : getWea().hashCode());
        result = prime * result + ((getSortWakeTime() == null) ? 0 : getSortWakeTime().hashCode());
        result = prime * result + ((getWakeMusic() == null) ? 0 : getWakeMusic().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", time=").append(time);
        sb.append(", wea=").append(wea);
        sb.append(", sortWakeTime=").append(sortWakeTime);
        sb.append(", wakeMusic=").append(wakeMusic);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}